home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / tch_tpas.zip / PROG10.PAS < prev    next >
Pascal/Delphi Source File  |  1986-04-05  |  1KB  |  42 lines

  1. PROGRAM PROG10;
  2. {$U+      Copyright (C), 1985 by Lyle Faurot.  All rights reserved.
  3.  
  4.     New Topics: WHILE statement
  5.                 CONST declaration
  6.                 Delay timing loop
  7.  
  8. }
  9. CONST
  10.   Wobble_Size = 5;
  11.   Left_Edge   = 10;
  12.   Message     = ', the Great Pascal Programmer!';
  13.  
  14. VAR
  15.   Index, Count, Delay   : Integer;
  16.   First, Last           : Char;
  17.  
  18. BEGIN
  19.   Write('Enter your first initial: ');
  20.   ReadLn(First);
  21.   Write('Enter your last initial: ');
  22.   ReadLn(Last);
  23.  
  24.   Write('Enter a positive number less than 8: ');
  25.   ReadLn(Count);
  26.   If Count > 8
  27.      THEN Count := 8;
  28.  
  29.   WHILE  Count > 0  DO
  30.     BEGIN
  31.      Count := Count - 1;
  32.        FOR Index := 1 to Wobble_Size DO
  33.          BEGIN
  34.            WriteLn(':  ':Left_Edge, First:Index, Last:2, Message);
  35.            FOR Delay := 1 to 500 DO {Do nothing, except loop};
  36.          END;
  37.  
  38.        FOR Index := Wobble_Size DownTo 1 DO
  39.            WriteLn(':  ':Left_Edge, First:Index, ' ',Last, Message);
  40.     END; {WHILE}
  41. END.
  42.